package com.example.travelapplication.entity;

import androidx.annotation.NonNull;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.ForeignKey;
import androidx.room.Ignore;
import androidx.room.Index;
import androidx.room.PrimaryKey;

@Entity(tableName = "favor",
        foreignKeys = {
                @ForeignKey(entity = Attraction.class, parentColumns = "attId", childColumns = "attId")},
        indices = {@Index("attId")})
public class Favor {
    @PrimaryKey(autoGenerate = true)
    public int favorId;

    @NonNull
    @ColumnInfo(name = "attId")
    public int attId;

    @Ignore
    public Favor(int attId) {
        this.attId = attId;
    }

    public Favor() {
    }
}
